package com.headwind.logistics.permission.service.intl;

import com.headwind.logistics.permission.dto.EmpRoleDTO;
import com.headwind.logistics.common.pojo.Employee;
import com.headwind.logistics.common.pojo.Menu;
import com.headwind.logistics.common.pojo.Role;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

/**
 * 业务逻辑层接口
 */
public interface EmployeeServiceIntl {
    /**
     * 后台管理登录
     * @param employee
     * @return
     */
    Employee adminLogin(Employee employee);

    /**
     * 根据员工号查询菜单记录
     * @param employeeNo
     * @return
     */
    Map<String,Object> queryMenusByEmployeeNo(String employeeNo);

    List<EmpRoleDTO> queryAllEmpRolePage(Integer page, Integer rows);

    List<Role> queryAllRole();

    int addEmployee(Employee employee,String roleId);

    int updateEmployeeByEmpId(Employee employee, HttpSession session);

    List<EmpRoleDTO> queryEmployeeByNameOrSexOrRoleOrTimeOrNo(EmpRoleDTO empRoleDTO,Integer page,Integer rows);

    List<Role> queryRoleByEmpId(Long employeeId);

    Integer addOrDeleteEmpRole(Long roleId,Long empId,boolean type);

    List<Employee> tempLogin();

    List<Menu> queryMenuPermsByEmpId(Long employeeId);
}
